Multi-addressable register files and format conversions associated therewith

ABSTRACT

A multi-addressable register file is addressed by a plurality of types of instructions, including scalar, vector and vector-scalar extension instructions. It may be determined that data is to be translated from one format to another format. If so determined, a convert machine instruction is executed that obtains a single precision datum in a first representation in a first format from a first register; converts the single precision datum of the first representation in the first format to a converted single precision datum of a second representation in a second format; and places the converted single precision datum in a second register.

BACKGROUND

One or more aspects of the present application relate, in general, todata processing, and in particular, to multi-addressable register filesand processing associated therewith.

High-performance processors support multimedia processing using singleinstruction multiple data (SIMD) techniques for exploitinginstruction-level parallelism in programs. That is, SIMD techniques areused for executing more than one operation at a time. These processorscontain multiple functional units, some of which are directed to theexecution of scalar data and some of which are grouped for theprocessing of structured SIMD vector data. SIMD data streams are used torepresent multimedia data types, such as color information, using, forexample, the RGB format by encoding the red, green, and blue componentsin the structured data type, or coordinate information, by encodingposition as the quadruple (x, y, z, w).

Processors designed for processing multimedia data have been implementedby augmenting an existing scalar processor implementation, for instanceby adding a SIMD unit, the SIMD unit itself including multiplefunctional units (i.e., fixed point units and floating point units)mirroring resources available for the processing of scalar data types,and replicating each functional unit type for the number of structuredelements to be supported by the SIMD architecture.

Processors that support multimedia processing, as well as otherprocessing, can process data of different types. However, facilities areto be provided to manage such processing.

BRIEF SUMMARY

Shortcomings of the prior art are overcome and additional advantages areprovided through the provision of a computer program product forexecuting a machine instruction. The computer program product comprisesa storage medium readable by a processing circuit and storinginstructions for execution by the processing circuit for performing amethod. The method includes, for instance, obtaining, by a processor, amachine instruction for execution, the machine instruction being definedfor computer execution according to a computer architecture, the machineinstruction includes, for instance, at least one opcode fieldidentifying a convert instruction; at least one field used to specify afirst register; and at least one other field used to specify a secondregister; executing, by the processor, the machine instruction, theexecuting including, for instance, obtaining from the first register asingle precision binary floating point datum in a first representationin a first format; converting the single precision binary floating pointdatum of the first representation in the first format to a convertedsingle precision binary floating point datum of a second representationin a second format; and placing the converted single precision binaryfloating point datum in the second register.

Methods and systems relating to one or more aspects of the presentinvention are also described and claimed herein. Further, servicesrelating to one or more aspects of the present invention are alsodescribed and may be claimed herein.

Additional features and advantages are realized through the techniquesof one or more aspects of the present invention. Other embodiments andaspects of the invention are described in detail herein and areconsidered a part of the claimed invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

One or more aspects of the present invention are particularly pointedout and distinctly claimed as examples in the claims at the conclusionof the specification. The foregoing and other objects, features, andadvantages of one or more aspects of the invention are apparent from thefollowing detailed description taken in conjunction with theaccompanying drawings in which:

FIG. 1 is a block diagram depicting an example of a processor includingboth scalar processing units and a SIMD unit for processing structureddata types;

FIG. 2 is one example of a data processing system in which one or moreaspects of illustrative embodiments may be implemented;

FIG. 3A is one example of a processor designed to execute both scalarand vector instructions using a register file storing both scalar andvector data and address information;

FIG. 3B shows a more flexible approach to selecting scalar data forinformation as may be used by a branch unit and load/store unit of aprocessor;

FIG. 4 is one example of a processor in which a multi-addressableregister file is utilized in accordance with one illustrativeembodiment;

FIG. 5 is one example of a Vector-Scalar Extension (VSX) register file,in accordance with one illustrative embodiment;

FIG. 6 depicts one example of logic outlining a general decode operationin accordance with one illustrative embodiment;

FIGS. 7A and 7B provide one example of logic outlining a decodeoperation in accordance with one illustrative embodiment;

FIG. 8 depicts one example of logic used to insert a conversioninstruction into an instruction stream, in accordance with anillustrative embodiment;

FIG. 9 depicts one example of logic used to select a conversioninstruction to be used to convert a vector element to scalar, inaccordance with an illustrative embodiment;

FIG. 10 depicts one example of logic used to select a conversioninstruction to be used to convert scalar data to a vector element inaccordance with an illustrative embodiment; and

FIG. 11 depicts one embodiment of a computer program productincorporating one or more aspects of the present invention.

DETAILED DESCRIPTION

In accordance with an aspect of the present invention, processingassociated with scalar and vector data is facilitated. In one aspect, aregister file is provided in which each register of the register filemay include 64 bit (b) single precision floating point scalar data or32b single precision vector data, as well as other data formats.Further, in one aspect, conversion techniques are provided to convertfrom one single precision floating point format to another singleprecision floating point format. In one example, the conversion isperformed using architected instructions and without signaling anexception.

As discussed earlier above and further in commonly assigned U.S.Publication No. 2009/0198966 A1, Gschwind et al., entitled“Multi-Addressable Register File,” published Aug. 6, 2009 and U.S. Pat.No. 7,877,582, Gschwind et al., entitled “Multi-Addressable RegisterFile,” issued Jan. 25, 2011, each of which is hereby incorporated hereinby reference in its entirety, processors designed for processingmultimedia data have typically been implemented by augmenting anexisting scalar processor implementation, for instance, by adding a SIMDunit, the SIMD unit itself including multiple functional units (i.e.,fixed point units and floating point units) mirroring resourcesavailable for the processing of scalar data types, and replicating eachfunctional unit type for the number of structured elements to besupported by the SIMD architecture. Often, the only units shared betweenthe scalar and SIMD processing units are the issue logic, which issuesinstructions to either the scalar or SIMD processing blocks, and theload/store unit (LSU), which governs access to the memory subsystem. Allother units, including the register files, are typically maintainedseparately.

FIG. 1 is a block diagram depicting an example of a prior art processorcontaining both scalar processing units and a SIMD unit for processingstructured data types, the SIMD unit comprising multiple processingunits for each element in the structured data type. In general, the useof separate scalar and SIMD processors is inefficient and expensive inthat such a configuration includes a number of redundant functionalunits and data paths. Furthermore, such implementations result in anundesirable amount of power consumption since while either the scalar orSIMD unit is processing data, the other is generally sitting idly by,awaiting its next instruction, but all the while consuming system power.

During operation of the system of FIG. 1, instructions are fetched byinstruction fetch unit 100, and supplied to an instruction decode unit102. Decoded instructions are passed to an issue/branch unit 104, wherebranch instructions are resolved and other instructions can be stored inthe instruction issue unit thereof (not shown) until they can beexecuted in one of the functional units of the processor. Theinstruction issue unit can contain prediction logic, instructionreordering logic, instruction issue buffers and other logic supportingthe high-performance issuing of instructions.

Instructions are issued by the issue/branch unit 104 to one or more ofthe load/store unit 106, the fixed-point unit (FXU) 108, thefloating-point unit (FPU) 110, or the SIMD processing block 112. Beforeinstructions can be processed by one or more of the processing units,one or more register accesses are usually required in a register file,e.g., the integer register file 114, the floating point register file116, or the vector register file 118, which is a part of the SIMDmultimedia extension found in many contemporary processors.

The SIMD multimedia processing block 112 typically contains a vectorregister file 118 for storing structured data (usually a vector havingfour elements). The vector register file 118 may be segmented into foursub-register files, each storing a single field of the structured data.The SIMD multimedia processor block 112 may contain several types offunction units, each type being replicated for the number of elements inthe structured data type supported by the multimedia extension. In FIG.1, there are shown fixed point units 119 and floating point units 120replicated four times to process one structure element each as can befound in the PowerPC® VMX multimedia extension.

It can be seen that, where both scalar and SIMD instruction executionare provided, separately addressable register files are typicallyrequired for the various types of instructions that may be encounteredby the CPU. For example, as shown in FIG. 1, a separate integer registerfile 114, floating point register file 116, and vector register file 118are provided. Having separate registers files in this manner isexpensive in terms of overhead as well as power consumption. Havingmultiple register files means that as code is executed, the code is toswitch or move between the various register files. This makes codegeneration expensive in terms of the overhead associated with movingbetween the various register files. Moreover, a compiler of the code mayrequire more of one or another set of resources associated with theregister files leading to register file fragmentation. Furthermore,having separate resources in the micro-architecture of the CPU increasesthe costs associated with fabrication of the CPU, as well as costsassociated with power consumption, heat dissipation, etc.

The above-described processor implementation is one example of prior artsystems; in some implementations, some register files may be shared,e.g., a combined integer and floating point register file, or additionalregister files may be present, such as a condition register file or apredicate register file for comparison results. In one particularexample described in U.S. Pat. No. 6,839,828, Gschwind et al., entitled“SIMD Datapath Coupled to Scalar/Vector/Address/Conditional DataRegister File with Selective Subpath Scalar Processing Mode,” issuedJan. 4, 2004, which is hereby incorporated herein by reference in itsentirety, a combined scalar/vector addressable register file isdescribed, along with a processor designed to operate in a plurality ofmodes for processing vector and scalar instructions. A parallel vectorunit, coupled to the register files, includes functional unitsconfigurable to operate in a vector operation mode and a scalaroperation mode. The vector unit includes an apparatus for tightlycoupling the functional units to perform an operation specified by acurrent instruction. Under a vector operation mode, the vector unitperforms, in parallel, a single vector operation on a plurality of dataelements. The operations performed on the plurality of data elements areeach performed by a different functional unit of the vector unit. Undera scalar operation mode, the vector unit performs a scalar operation ona data element received from the register files in a functional unitwithin the vector unit.

While the mechanism of U.S. Pat. No. 6,839,828 provides the ability tostore different types of instructions/data in the register file, inorder to achieve this ability, the '828 patent sets forth a newarchitecture. This new architecture, however, does not provide formulti-addressability, i.e. different ways of addressing registers in theregister file based on the instruction type, e.g., legacy scalar, legacyvector, or a new instruction type.

One or more illustrative embodiments described herein, as well as inU.S. Pat. No. 7,877,582, provide a multi-addressable register file. Sucha multi-addressable register file may be implemented in a processor of adata processing system. Such a data processing system may have one ormore processors in which each processor, or a subset of processors, mayimplement the multi-addressable register file of the illustrativeembodiments. The types of data processing systems in which processorshave a multi-addressable register file in accordance with one or moreillustrative embodiments may vary considerably, and thus, the presentdescription cannot address each such possible processor architecture.However, for purposes of illustration, FIG. 2 is provided as an exampleof one type of data processing system in which the multi-addressableregister file of one or more illustrative embodiments may beimplemented.

With reference now to FIG. 2, a block diagram of an exemplary dataprocessing system is shown in which aspects of one or more illustrativeembodiments may be implemented. Data processing system 200 is an exampleof a computer, in which computer usable code or instructionsimplementing the processes for one or more illustrative embodiments ofthe present invention may be located.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbinary input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within dataprocessing system 200 in FIG. 2. As a client, the operating system maybe a commercially available operating system such as Microsoft® Windows®XP (Microsoft and Windows are trademarks of Microsoft Corporation in theUnited States, other countries, or both) or the Linux® operating system(Linux is a trademark of Linus Torvalds in the United States, othercountries, or both). An object-oriented programming system, such as theJava™ programming system, may run in conjunction with the operatingsystem and provides calls to the operating system from Java™ programs orapplications executing on data processing system 200 (Java is atrademark of Sun Microsystems, Inc. in the United States, othercountries, or both).

As a server, data processing system 200 may be, for example, an IBM®eServer™ System P® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or the Linux® operating system(eServer, System P® and AIX are trademarks of International BusinessMachines Corporation in the United States, other countries, or both).Data processing system 200 may be a symmetric multiprocessor (SMP)system including a plurality of processors, such as the POWER® processoravailable from International Business Machines Corporation of Armonk,N.Y., in processing unit 206. Alternatively, a single processor systemmay be employed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for one or more illustrativeembodiments may be performed by processing unit 206 using computerusable program code, which may be located in a memory, such as, forexample, main memory 208, ROM 224, or in one or more peripheral devices226 and 230, for example.

A bus system, such as bus 238 or bus 240, as shown in FIG. 2, may becomprised of one or more buses. Of course, the bus system may beimplemented using any type of communication fabric or architecture thatprovides for a transfer of data between different components or devicesattached to the fabric or architecture. A communication unit, such asmodem 222 or network adapter 212 of FIG. 2, may include one or moredevices used to transmit and receive data. A memory may be, for example,main memory 208, ROM 224, or a cache, such as found in NB/MCH 202 inFIG. 2.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1-2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1-2. Also, theprocesses of one or more illustrative embodiments may be applied to amultiprocessor data processing system, other than the SMP systemmentioned previously, without departing from the spirit and scope of oneor more aspects of the present invention.

Moreover, data processing system 200 may take the form of any of anumber of different data processing systems including client computingdevices, server computing devices, a tablet computer, laptop computer,telephone or other communication device, a personal digital assistant(PDA), or the like. In some illustrative examples, data processingsystem 200 may be a portable computing device which is configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data, for example. Essentially, dataprocessing system 200 may be any known or later developed dataprocessing system without architectural limitation.

As discussed above, one or more illustrative embodiments provide amulti-addressable register file. One or more illustrative embodimentsimprove upon known register files by increasing the capability of theregister file by providing a large number of registers and an ability toaddress a first subset of registers with a first set of instructions,address a second subset of registers with a second set of instructions,and to address the entire register file with at least a third set ofinstructions. In accordance with one or more illustrative embodiments,the first and second subsets of registers are non-overlapping and referto distinct register file areas, such as “registers for instructions oftype 1” and “registers for instructions of type 2.” A register containedwithin the subset corresponding to instructions of type 1 cannot beaccessed by instructions of type 2, and vice versa. In one illustrativeembodiment, the type 1 instructions correspond to IBM Power ArchitectureFPU, or legacy floating point instructions, the type 2 instructionscorrespond to IBM Power Architecture legacy VMX instructions, and thetype 3 instructions correspond to IBM Power Architecture VSXinstructions.

The mechanisms of one or more illustrative embodiments differ from knownclustered register files, operand subranges within register files,processors with “move between register file” instructions, and VMX128register files, which uses a form of subranges with non-contiguousregister specifiers. With operand subranges, typically there is onesubrange for one operand only, i.e. one type of instruction. There is noother instruction type that has another form that may address allregisters in the register file and there is no other range of registersfor another type of instructions, i.e. there is no multi-addressabilityfunctionality. Clustered register files comprise a large register filewith sub-ranges addressable by different instructions, but there is noinstruction type that may address all of the registers in the registerfile. To the contrary, if operations are to be performed on the full setof registers, then move/copy operations are to be performed on theregister file. These move/copy operations are usually slower operationsthat may require special scheduling mechanisms.

In contradistinction, one or more illustrative embodiments provideaccess to the registers of the multi-addressable register file based onthe instruction type, e.g., legacy floating point, legacy scalar,vector-scalar, enhanced or extended vector-scalar, etc. Rather than onesubset of registers associated with one operand type, themulti-addressable register file of one or more illustrative embodimentsprovides multiple disjointed subsets of registers. The multiple subsetsof registers, in the multi-addressable register file, associated withthe various types of instructions are contiguous ranges of registers.Moreover, with one or more illustrative embodiments, while instructionsof different types may access non-overlapping subsets of registers inthe multi-addressable register file, at least one type of instructionmay also access all of the registers in the multi-addressable registerfile.

In one particular embodiment, in accordance with an aspect of thepresent invention, instructions of different types may accessnon-overlapping subsets of registers in the multi-addressable registerfile and multiple types of instructions (e.g., 64b scalar singleprecision floating point instructions and 32b vector single precisionfloating point instructions) may access all of the registers in themulti-addressable register file.

In another aspect of the present invention, one or more illustrativeembodiments extend known scalar/vector register files by including anability to execute scalar, vector, and floating point instructions usingthe same register file with the portion of the register file to beaccessed being dynamically determined based on the type of instructionbeing executed. Since one or more illustrative embodiments improve uponknown scalar/vector register files, and the processors that use suchscalar/vector register files, an understanding of the basic operation ofsuch a processor and scalar/vector register file is provided. Thefollowing description of FIGS. 3A and 3B reference commonly assignedU.S. Pat. No. 6,839,828 as an example of such a known scalar/vectorregister file and processor.

FIG. 3A is one example diagram of a processor designed to execute bothscalar and vector instructions using a register file storing both scalarand vector data and address information in accordance with U.S. Pat. No.6,839,828. In the processor shown in FIG. 3A, scalar and SIMD data pathprocessing capabilities have been combined with the SIMD vector datapath now subsuming scalar processing. Scalar processing occurs in one ofthe units used for processing one element of a vector data type. Thisdata unit is designated the “preferred slot” and provides addresses forthe branch unit and the load/store unit, as will be described below. Forsimplicity, the depiction of the unified processor in FIG. 3A includesdata flow connections only, and not control signal connections andexternal system interfaces, e.g., address lines, connections withmemory, etc. The latter connections are assumed.

The unified processor of FIG. 3A includes an instruction fetch unit 300,which fetches instructions and data from the system's memory hierarchy(not shown) based upon the value of the fetch unit's program counter.Fetched instructions are provided by instruction fetch unit 300 toinstruction decode unit 302, where they are decoded and expanded intoappropriate control signals for controlling downstream units. Theexpanded instruction is passed to issue/branch unit 304, where it isplaced into an instruction queue to await availability of appropriatefunctional units for processing. In the event that the instruction is abranch, control is returned to instruction fetch unit 300, which fetchesthe branch-target instruction, and the above process is repeated.

In the case of a scalar operation, when a functional unit (i.e., fixedpoint unit or floating point unit) becomes available or in the case of avector operation, when multiple functional units become available, theissue/branch unit 304 issues the instruction to the one or morefunctional units. Before computation can be performed, source operanddata is retrieved by accessing a scalar-vector register file (SVRF) 310.Multiple types of function units are typically provided, e.g., fixedpoint units, floating point units, and a load/store unit (LSU) 306, thelatter fetching from and storing to the memory hierarchy the dataidentified by the current instruction. The LSU 306 stores the result ofmemory accesses back to the combined SVRF 310 via bus 308. In thisembodiment, SVRF 310 stores data lines consisting of four scalar datawords, each line being partitioned such that each of the four data wordsis associated with a different functional unit pair (or set) 311-314,each functional unit pair including a fixed point unit and a floatingpoint unit, as shown. The functional unit pairs make up what is referredto herein as a parallel vector unit.

Issue logic directs the SVRF 310 to pass the contents of a data line tothe appropriate functional unit within each set of functional units, forprocessing. There may be any number and type of functional unitsassociated with an issue slot, including, but not limited to,fixed-point unit, floating-point unit, comparison unit, logicaloperation unit, shift unit, etc. The particular functional unit withinthe set that will use the data word will depend on the instruction to beexecuted, and is controlled by a signal from issue/branch unit 304.Thus, if the instruction requires the fixed point units to operate onthe data, data will be passed to fixed point units 319-322 via lines315-318. If the instructions require floating point units 327-330, datawill be passed via lines 323-326. If other functional unit types werepresent, data would similarly be passed to them. When each designatedfunctional unit has performed its operation on the input data, it passesa result back to SVRF 310, where it is stored until requested by LSU306, or passed to the functional units for further manipulation.

The operations to be performed by the functional units, and thefunctional units to perform those operations, are determined by controlsignals provided by issue/branch unit 304. When an operation directs theLSU 306 to read data from SVRF 310, the data is passed via data bus 332.In addition, the address to which the data is to be stored in memory ispassed to LSU 306 via bus 331. In the embodiment of FIG. 3A, address bus331 passes information from a segment (D) of SVRF 310, which isassociated with functional unit pair 314 (this pair being designated apreferred slot, as described later). The preferred slot could be any ofthe functional units, by either defining them as a preferred slot, or bymeans of dynamically determining a preferred slot, either by setting acontrol register, specifying a slot in the instruction word, or bydetermining it using any other means, e.g., by the issue unit at issuetime. The designation of a preferred slot allows for selectivepowering-down of functional units, resulting in power savings.

To this point, the described operation of the unified processor hasapplied to both scalar and vector operations. That is, if an operationto be performed is a scalar operation, thus requiring operation andoutput of only one functional unit pair, the remaining functional unitpairs may nevertheless be directed to perform the same operation on datapassed to them from the scalar vector register file. Such an approachallows for simplicity of design, since to require different functionalunits to simultaneously execute different operations necessarilyintroduces complicating design considerations. Likewise, for a vectoroperation, each functional unit pair will perform the same operation (orsubstantially the same operation as part of a tightly coupled operation,or a combination of tightly coupled operations as specified by a singleinstruction) on incoming data.

Scalar and vector operations are distinguished by the manner in whichassociated address information is used, in accordance with theinterpretation of the operation. The operation's interpretation may be adirect result of its operation code, that is, different operation codesmay be available for different instructions (e.g., “load scalar byte,”“load scalar word,” “load scalar vector”) or may depend on another partof the system, e.g., mode tag bits to interpret a single “load” opcode.Even scalar data spans an address range of bytes (although fewer bytesthan a vector) and there are also variations on how load/store mayoperate.

Unlike other functional units, which are typically assigned to aspecific slot within the SVRF 310, the LSU 306 operates on the entireline of data, or a subset thereof, contained within SVRF 310. The LSU306 operates in either load or store operation mode, depending on theinstruction issued by the issue/branch unit 304. In load mode, LSU 306receives address information from the preferred slot of the SVRF 310using bus 331, and loads data from the specified address. When a loadvector instruction is being executed, the load operation loads an entireline of data from memory to SVRF 310 using bus 308. When a load scalaroperation is specified, the load operation will load at least the numberof bits corresponding to the size of the scalar type (typically, byte,half-word, word, and so forth). Additional bits may be loaded inaccordance with implementation choices, or invalid data, or datainitialized to a default value (such as, but not limited to, “0”) may beprovided for those bits outside the range of the requested data type. Inone embodiment, the “load scalar” operation includes an alignment step,wherein a requested scalar value is aligned in the preferred slot beforebeing stored to SVRF 310. In another embodiment, alignment is performedprogrammatically using a sequence of one or more instructions.

In the store mode of operation, the LSU 306 receives data to be storedfrom the SVRF 310 by means of bus 332, and address information from thepreferred slot of the SVRF 310 using bus 331, and stores data to thespecified address.

FIG. 3B shows a more flexible approach to selecting scalar data forinformation as may be used by the branch unit and LSU in accordance withU.S. Pat. No. 6,839,828. In accordance with this embodiment, the varioussegments of SVRF 310 are selectable by means of a multiplexer 333, whichmay be controlled with a control input via line 334 from issue/branchunit 304 (which may typically come from a field in the instruction wordof the instruction to be executed). Alternate embodiments may include,but are not limited to, a software-controlled special purpose registeror a boot-time parameter for supplying the control input of themultiplexer.

The embodiment shown in FIG. 3B operates as follows. When a scalar datavalue is required by either the load/store unit to supply a memoryaddress for an operation, or by the branch unit to supply, e.g., abranch target address, or a branch condition, or by a shift unitrequiring a single shift count to be applied to all elements, or anyother unit which may require a scalar data value as its input, themultiplexer 333 is steered by the control input to select one of slotsA, B, C, or D as the scalar input for the operation. Thus, in accordancewith this embodiment, any of the functional unit pairs can be selectedas a “preferred slot”, allowing processing operations to be balanced,reduce the need for transfer operations between multiple slots andincrease the number of slots in which scalar values can be stored.

Thus, U.S. Pat. No. 6,839,828 describes two different implementations ofa preferred slot for scalar processing. The first being a hardwiredimplementation, wherein the preferred slot is selected at the designphase, and a variable approach, where the preferred slot can be selectedon the fly, during execution. As mentioned in the '828 patent,designation of a preferred slot at design time can simplify theimplementation in that the above-described selection need not beprovided. Moreover, use of identical functional unit pairs may be moreefficient, even at the slight overhead cost of having useless circuitrywhich is never exercised for the preferred slot.

While the register file mechanisms of U.S. Pat. No. 6,839,828, and otherregister file mechanisms, allow for a single register file to be usedfor both scalar and vector operations, these register file mechanisms donot provide multi-addressability, but only the ability to storedifferent types of instructions/data in a single register file. Acomplex architecture and/or operations have been provided for handlingthe different types of instructions/data in the single register file.

In contrast, one or more illustrative embodiments provide amulti-addressable register file that permits both legacy instructionsand one or more new or enhanced types of instructions to access theregisters of the multi-addressable register file. With the mechanisms ofone or more illustrative embodiments, a single register file may beaddressed using both scalar and Single Instruction Multiple Data (SIMD)or vector instructions. That is, subsets of registers within amulti-addressable register file according to one or more illustrativeembodiments, are addressable with different instruction forms, e.g.,scalar instructions, SIMD or vector instructions, etc., while the entireset of registers may be addressed with yet another form of instructions,referred to herein as Vector-Scalar Extension (VSX) instructions. Thetypes of operations, i.e. the operation set, that may be performed onthe entire set of registers using the VSX instruction form issubstantially similar to that of the operation sets of the subsets ofregisters.

The multi-addressable register file of one or more illustrativeembodiments allows legacy instructions to access subsets of registerswithin the multi-addressable register file while new or enhancedinstructions, e.g., the VSX instructions, may access the entire range ofregisters within the multi-addressable register file. Moreover, the dataformats of the legacy instructions are compatible with the data formatsof the VSX instructions. Thus, data generated by legacy instructions maybe processed by the VSX instructions and vice versa.

For example, one or more illustrative embodiments allow legacy floatingpoint instructions (scalar operations) to work on values stored in afirst subset of registers of a register file, e.g., VSX registers 0-31;legacy VMX instructions (vector operations) to work on a second subsetof registers in the register file, e.g., VSX registers 32 to 63 (whilecontinuing to refer to registers 0 to 31 in the actual instructions);and VSX instructions (vector-scalar operations) to operate on all of theregisters of the register file, e.g., VSX registers 0 to 63. One or moreof the illustrative embodiments further allow instructions of differenttypes to share data using the various subsets of registers and theability of the VSX instructions to access all of the registers of theregister file. For example, data may be shared between VSX and legacyfloating point instructions by storing and accessing data in VSXregisters 0 to 31. Similarly, one or more illustrative embodiments allowdata to be shared between legacy VMX instructions and VSX instructionsin VSX registers 32 and 63, while continuing to execute programs thatuse either one or both of legacy floating point and legacy VMXinstructions without any modification. Moreover, one or moreillustrative embodiments permit linking code modules that use either oneor both of legacy floating point and legacy VMX instructions without anymodification to code modules that employ the new VSX instructions aswell as share data between code modules computing with legacyinstructions and those using VSX instructions.

In one particular embodiment, in accordance with an aspect of thepresent invention, the VSX instructions include 64b scalar singleprecision floating point instructions and 32b vector single precisionfloating point instructions, as well as possibly other instructions.Examples of 64b scalar single precision floating point instructions aredescribed in RFC02182.r6: VSX Scalar Single-Precision included as partof this Detailed Description.

FIG. 4 is one example of a diagram of a processor in which amulti-addressable register file is utilized in accordance with oneillustrative embodiment. As shown in FIG. 4, the processor 400 issimilar in configuration to the processor of FIG. 3A with the exceptionof the configuration and utilization of the register file 440. Theinstruction fetch unit 410, issue/branch unit 430, functional units450-480 of the functional unit pairs (or sets) 482-488, and load/storeunit 490 all operate in a similar manner as described above with regardto FIG. 3A. The instruction decode unit 420 has additional logic, asdescribed hereafter, that is used to decode instructions of threedifferent types: vector, scalar, and a vector-scalar instruction type.In one illustrative embodiment, these three different types ofinstructions are vector multimedia extension (VMX) instructions,floating point (FP) instructions, and Vector-Scalar Extension (VSX)instructions. FP operations are generally known in the art. VMXinstructions are used in the POWER 6 processor, available fromInternational Business Machines Corporation of Armonk, N.Y. and providesingle instructions that operate on multiple data elements. VSXinstructions will be described in greater detail hereafter.

Based on the decoded instructions, the instruction will access either asub-range of the register file 440 or the entire range of registers inthe register file 440. If the instruction is determined by theinstruction decode unit 420 to be a legacy floating point instruction,then a first sub-range 442 of the register file 440 is accessed, withthe data being provided to appropriate functional units 450-480 forprocessing. If the instruction is determined by the instruction decodeunit 420 to be a legacy VMX vector instruction, then a second sub-range444 of the register file 440 is accessed, with the data again beingprovided to appropriate functional units 450-480 for processing. If theinstruction is determined by the instruction decode unit 420 to be a VSXinstruction, then the entire range 446 of the register file 440 may beaccessed, with the data being provided to appropriate functional units450-480 for processing. Depending on the particular VSX instructionbeing executed, a VSX instruction accessing any of registers 446 can useeither the entire width of the register to obtain input data(corresponding to a VSX vector instruction and providing access to allregisters of register file 446 in each of the operand positions of theinstruction), or a portion thereof (corresponding to a VSX scalarinstruction and providing access to all registers of register file 446in each of the operand positions of the instruction, but using only asubset of bits contained therein)

The first sub-range 442 comprises a first range of bits of a first setof registers in the register file 440. The second sub-range 444comprises a second range of bits of a second set of registers in theregister file. The third range 446 comprises an entire range of bits ofthe entire set of registers in the register file 440. In this way, asingle register file 440 may be used to process both legacy scalar andlegacy vector instructions, as well as a combined set of vector-scalarinstructions, referred to herein as VSX instructions.

VSX instructions are instructions that can access the entire set ofregisters of a register file 440. The VSX instruction set includesseveral classes of instructions, including single precision scalarfloating point instructions accessing a 32-bit subrange of each registerof the entire register file 440; single precision scalar floating pointinstructions accessing a 64-bit subrange of each register of the entireregister file 440; double precision scalar floating point instructionsaccessing a 64-bit subrange of each register of the entire register file440; and vector instructions accessing the entire range of bits in theentire register file 440. The VSX instructions use a selected type ofregister specifier, e.g., a 6 bit register specifier as opposed to alegacy 5 bit specifier that is used by legacy scalar and legacy vectorinstructions.

Thus, one or more illustrative embodiments provide a singlescalar/vector architecture for a register file that is compatible withlegacy architectures having separate scalar and vector register files.One or more illustrative embodiments further allow sharing of thestorage space of the processor between legacy register files andexpanded vector-scalar register files without leading to increased chiparea. Moreover, one or more illustrative embodiments allow data sharingbetween legacy programs and libraries using legacy instructions, andprograms and libraries (using either legacy or new/enhancedinstructions), as well as interoperation of code, thereby protectinginvestment in code tuning of legacy applications and avoiding the needto recode all applications to use the new/enhanced instructions whileallowing the new/enhanced instructions to be used where they are mostprofitable. As a result, the expensive overhead experienced by knownprocessor architectures that utilize separate register files for scalarand vector, e.g., single instruction multiple data (SIMD) instructions,as well as the additional costs involved with complex new architecturesfor handling both scalar and vector instructions using a single registerfile, may be avoided.

The register file 440 is comprised of a plurality of vector-scalarregisters (VSRs), each VSR having a plurality of bits. For example, theregister file 440 may be comprised of 64 VSRs numbered VSR[0] toVSR[63], with each VSR having 128 bits numbered 0 to 127. Forrepresentation purposes, it will be assumed that VSRs are numberedconsecutively from the top to the bottom of the register file 440 withbits being numbered consecutively from left to right of the registerfile 440. This is shown in FIG. 5 discussed hereafter.

FIG. 5 is an exemplary diagram of a Vector-Scalar Extension (VSX)register file in accordance with one illustrative embodiment. The VSXregister file 500 of FIG. 5 may be utilized as register file 440, forexample. As shown in FIG. 5, the VSX register file 500 includes aplurality of vector-scalar registers (VSRs) 510 numbered VSR[0] toVSR[63]. Each of the VSRs 510 has a predetermined number of bits thatmay be set. In the depicted example, each VSR 510 has 128 bits numbered0 to 127 for storing data corresponding to instructions, such as forparameter passing.

A first sub-range of bits 520 in a first set of registers 530 of theregister file 500 is associated with a first type of instruction, suchas a scalar or floating point instruction. A second sub-range of bits540 in a second set of registers 550 in the register file 500 isassociated with a second type of instruction, such as a vector, SIMD, orVMX instruction. A third range of bits 560 in the entire set ofregisters 570 of the register file 500 is associated with a third typeof instruction, such as a VSX instruction.

It can be appreciated from FIG. 5 that the VSX register file 500 differsfrom other register files in other systems by allowing three differenttypes of instructions to access registers of the VSX register file 500based on associated register ranges and bit widths within the registers.Other register files require that the entire register file be accessedin the same manner for all types of instructions by specifying theregister to be accessed with respect to the entire set of registers 570rather than with respect to a subset of registers that corresponds toall operands of a specific instruction type.

With the VSX register file 500, when a legacy scalar operation is toread/write data from/to the VSX register file 500, in one illustrativeembodiment, the scalar data value is read/written from/to the left sideof the register width, i.e. bits 0 to 63 of registers VSR[0] to VSR[31],for example first sub-range 520. There are a number of ways writing ofscalar values to the vector-scalar registers (VSRs) may be accomplishedwith the illustrative embodiments. In one illustrative embodiment, allof the bits of the VSR may be written with the scalar value beingwritten to bits 0 to 63, while values corresponding to the result of avector computation being performed for the bits not corresponding to thescalar data value, on the registers specified by the scalar instruction,are written to the bits 64 to 127. For example, if the data values ofregisters F0 and F1 are added to give a result in register F3, the valueof VSR3 in bits 64 to 127 might correspond as if a vector operation hadbeen performed on the bits 64 to 127 of VSR0 and VSR1.

In another illustrative embodiment, the scalar value that is to bewritten to bits 0 to 63 may be replicated in bits 64 to 127. Thisapproach may be beneficial, for example, when a scalar floating pointvalue should later be combined with a vector value, e.g., whenmultiplying a vector by a scalar value. Normally the scalar value has tofirst be replicated across an entire register, such as with a “splat”instruction of the VMX or VSX instruction sets. This approach wouldeliminate the need for performing a “splat” instruction since the scalarvalue is already replicated.

In still another illustrative embodiment, the scalar value may bewritten to bits 0 to 63 of the register while whatever values that werepresent in bits 64 to 127 may remain unchanged. Such an approach may beused when a vector operation may need to be decomposed into a sequenceof scalar operations, where each scalar result could be inserted into aspecific vector element, ultimately creating a vector result from themultiple scalar results. This would be the lowest power embodimentsince, when nothing needs to be written to the registers, nothing iswritten. However, it may lead to indeterminism, because the valuepresent in the entire register may now be dependent on what value wasresident in the register file prior to a scalar result being written.This is particularly problematic for architectures with registerrenaming, where the value present in the rename register is highlyunpredictable.

In another illustrative embodiment, the scalar value may be written tobits 0 to 63 of the register while the remaining bits 64 to 127 may befilled with a default value, e.g., a zero. Such an approach may be usedwhen a vector operation may need to be decomposed into a sequence ofscalar operations, where the multiple scalar results are shifting andORed together to form a vector result. This approach gives a predictablevalue, thus avoiding the problems associated with not writing anything.This option further represents lower load on the result bus thanreplicating the value (because that value does not have to be providedto 2 locations in the register which double the load).

For legacy vector, SIMD, or VMX instructions, the data values are readfrom/written to the entire range of bits 0 to 127 of the second set ofVSRs [32] to [63]. For the new VSX instructions, data values are readfrom/written to the entire range of bits 0 to 127 of the entire set ofVSRs [0] to [63]. With these VSX instructions, scalar values are writtenin the left side bits 0 to 63 of the registers, while vector values arewritten across all of the bits 0 to 127.

Thus, with the mechanisms of one or more illustrative embodiments, whendecoding instructions, there are really two characteristics of theinstructions that are to be decoded. First is the width of the dataaccess, i.e. the access width specification, and second is the registerspecifier. The access width specification identifies which bits of aregister are to be read/written. The register specifier identifies whichsubset of registers, or the entire set of registers, in themulti-addressable register file that are to be read/written. The primaryrequirement for decoding the instruction is the register specifier whichallows the multi-addressability aspect of overlaying the legacy smallerregister files on top of the vector-scalar register file to allowstorage sharing.

Referring again to FIG. 4, as discussed above, decoding logic is addedto instruction decode unit 420 of processor 400 for handling the threetypes of instructions using the single register file of the illustrativeembodiments. The decoding logic determines the type of instruction and,based on the type of instruction, generates a width specifier forspecifying the bit width of the registers in the register file 440 thatmay be accessed by the instruction. A full specifier for the entireregister width is then generated based on the type of instruction andthe width specifier, and registers within a corresponding subset ofregisters 442-446 in the register file 440 are then addressed using thefull specifier. Results of the operation are then computed based on theaddressing of the subset of registers 442-446 using the full specifierwith results of the operation being written back to the subset ofregisters 442-446 in the register file 440.

In accordance with one illustrative embodiment, there is provided animplementation of the Power Architecture (also known under the names of“PowerPC®” and “Power ISA™”) including at least a first set ofinstructions of “Category: Floating-Point” (FPU, or legacy FPU), asecond set of instructions of “Category: Vector” (VMX), and a third setof instructions of “Category: VSX” in accordance with specifications setforth in the Appendices included in U.S. Pat. No. 7,877,582 (U.S.Publication No. 2009/0198966A1), each of which is hereby incorporatedherein by reference in its entirety; the documentation that is a part ofthis Detailed Description; and in the following publications: “PowerISA™ Version 2.05,” Chapters 4, 5 and 6, International Business MachinesCorporation, Oct. 23, 2007, and “Power ISA™ Version 2.06 Revision B”,Chapter 7, International Business Machines Corporation, Jul. 23, 2010,each of which is hereby incorporated herein by reference in itsentirety. Each of “Power ISA™ Version 2.05”, International BusinessMachines Corporation, Oct. 23, 2007, and Power ISA™ Version 2.06Revision B”, International Business Machines Corporation, Jul. 23, 2010,is hereby incorporated herein by reference in its entirety.

Detailed information regarding floating point processor facilities isprovided in “Power ISA™ Version 2.05—Chapter 4—Floating-Point Processor[Category: Floating-Point]”. Detailed information regarding a VMXprocessor facility is provided in Power ISA™ Version 2.05—Chapter6—Vector Processor [Category: Vector]”. Detailed information regarding aVSX processor facility is provided in Power ISA™ Version 2.06 RevisionB—Chapter 7—Vector-Scalar Floating-Point Operations [Category: VSX]”,which is hereby incorporated herein by reference in its entirety, aswell as in “RFC02182.r6: VSX Scalar Single-Precision” and “Chapter 7:Vector-Scalar Floating Point Operations [Category: VSX]” included aspart of this Detailed Description. In accordance with one illustrativeembodiment, additional sets of instructions, such as of “Category:Decimal Floating-Point”, may be present as detailed in “Power ISA™Version 2.05—Chapter 5—Decimal Floating-Point [Category: DecimalFloating-Point]”, which is hereby incorporated herein by reference inits entirety.

In accordance with an aspect of the present invention, RFC02182.r6 andChapter 7 included herewith describe a new set of VSX instructions thatinclude 64b single precision scalar instructions, which differ from the32b scalar instructions previously provided. The provision of 64b scalaroperations enables further compatibility with legacy scalar operationsthat are also 64b.

FIGS. 6-7B are flowcharts outlining example decoding operations that maybe implemented in the decode logic of the instruction decode unit of oneor more illustrative embodiments. It will be understood that each blockof the flowchart illustrations, and combinations of blocks in theflowchart illustrations, can be implemented by computer programinstructions. These computer program instructions may be provided to aprocessor or other programmable data processing apparatus to produce amachine, such that the instructions which execute on the processor orother programmable data processing apparatus create means forimplementing the functions specified in the flowchart block or blocks.These computer program instructions may also be stored in acomputer-readable memory or storage medium that can direct a processoror other programmable data processing apparatus to function in aparticular manner, such that the instructions stored in thecomputer-readable memory or storage medium produce an article ofmanufacture including instruction means which implement the functionsspecified in the flowchart block or blocks.

Accordingly, blocks of the flowchart illustrations support combinationsof means for performing the specified functions, combinations of stepsfor performing the specified functions and program instruction means forperforming the specified functions. It will also be understood that eachblock of the flowchart illustrations, and combinations of blocks in theflowchart illustrations, can be implemented by special purposehardware-based computer systems which perform the specified functions orsteps, or by combinations of special purpose hardware and computerinstructions.

Furthermore, the flowcharts are provided to demonstrate the operationsperformed within the illustrative embodiments. The flowcharts are notmeant to state or imply limitations with regard to the specificoperations or, more particularly, the order of the operations. Theoperations of the flowcharts may be modified to suit a particularimplementation without departing from the spirit and scope of thepresent invention.

FIG. 6 is a flowchart outlining a general decode operation in accordancewith one illustrative embodiment. As shown in FIG. 6, the operationstarts with receiving a fetched instruction from an instruction fetchunit, STEP 610. Based on an opcode of the fetched instruction, thedecode logic determines if the fetched instruction is a VSX instruction,STEP 615. If the opcode identifies the instruction to be a VSXinstruction (or other selected type of instruction), a full registerspecifier is extracted from one or more fields in the instructionencoding, STEP 620. Instructions are specified by instruction wordshaving several fields. These fields may include an opcode field, severalregister specifier fields, and a secondary opcode field, for example.When an instruction is encountered, the instruction decoder maydetermine what type of instruction is encountered (this is done byanalyzing the opcode and secondary opcode field) which will alsotypically indicate what bits of a register to use (e.g., the subrange520, 540, 560 to use.) The register specifier fields specify whichregister of 530, 550, or 570 to access. In one embodiment, each of theregister specifier fields may provide a 5 bit specifier, i.e. a narrowspecifier. Extension fields may be provided in the instruction word toprovide an additional bit giving 6 bits to specify one of the 64 VSRregisters of the register file.

Corresponding registers in the register file are addressed, i.e.selected, so as to provide their data values to appropriate computationor functional units for processing, STEP 625. That is, the full registerspecifier is provided to the register file, such that the register fileknows which of the registers 570 to read or write. The registerspecifier is an “address” in a storage array that identifies a register.

The operand data values are processed by the computation/functionalunits, STEP 630, and results of the processing by the computation orfunctional units are then written back to the corresponding registers inthe register file, STEP 635. The specific register to write back to isagain specified by a register specifier.

If the opcode of the fetched instruction indicates that the instructionis not a VSX instruction (or other type of instruction), STEP 615, thena narrow register specifier is extracted that identifies a subset ofregisters, and possibly bits within the full width of a register, foruse with the instruction, STEP 640. A full register specifier for theentire range of bits of the register is then generated based on theinstruction type and the narrow bit range specifier, STEP 645. That is,one or more bits are added to the narrow register specifier to generatethe full register specifier. The bits to be added depend on thesubranges of the register file and how they were defined. For example,for legacy scalar instructions a 5-bit operand specifier, i.e. a narrowbit range specifier, is provided for each operand in the instructionencoding. A full register specifier may be generated, for example, bypre-pending a 0 to produce a 6-bit specifier, giving access to VSRs 0-31in the depicted examples. For legacy vector instructions, a 5-bitoperand specifier, i.e. a narrow register specifier, is provided foreach operand in the instruction encoding. A full register specifier maybe generated, for example, by pre-pending a 1 to produce a 6-bitspecifier, giving access to VSRs 32-63. For VSX instructions, a 6-bitoperand specifier, i.e. a full bit range specifier, is provided for eachoperand in the instruction encoding, and thus, no modification is neededto access all of the VSRs in the register file.

The narrow and full register specifiers of one or more of theillustrative embodiments allow for the “multi-addressable” nature of theregister file which refers to the fact that different instructions ineffect contain different addresses, and that the decoding adapts them,to overlay and use shared addressing of the register file. Thus, forexample, a VSX register full register specifier with the 6 bits 000000refers to VSX register 0. A legacy floating point instruction with anarrow register specifier of 5 bits 00000 refers to the same register,because it overlays the first 32 registers of VSR registers and isobtained by adding a “0” to the 5 bit narrow register specifier, giving000000 in this specific example. On the other hand, a legacy VMX narrowregister specifier of 5 bits 00000 refers to register 32 (the firstregister in the VSR 32 to 63 range), and is obtained by adding a “1” tothe 5 bit specifier, giving 100000 in the specific example.

Once the full register specifier is obtained, registers in a subset ofregisters associated with the instruction type identified by the opcodeare addressed based on the full register specifier, STEP 650. A bitwidth may optionally be determined based on the instruction type suchthat a first set of bits of the register are associated with oneinstruction type, e.g., legacy scalar instructions, and another set ofbits of the register are associated with another instruction type, e.g.,legacy vector instructions. This functionality was described above andis optional to the particular implementation. Because it is optional, itis not explicitly shown in FIG. 6.

The operation then continues to STEP 630 where data values, e.g.,operand values, from the addressed registers are provided to thecomputation/functional units for processing, STEP 630, and results arewritten back to the registers in the subset of registers, STEP 635,using the full register specifier. The operation then terminates.

FIGS. 7A and 7B depict a flowchart outlining one example of a decodeoperation for one implementation in accordance with one illustrativeembodiment. As shown in FIGS. 7A and 7B, the operation again starts withreceiving a fetched instruction from an instruction fetch unit, STEP710. Based on an opcode of the fetched instruction, the decode logicdetermines if the fetched instruction is a VSX instruction (or otherselected type of instruction), INQUIRY 715. If the opcode identifies theinstruction to be a VSX instruction, a wide bit range specifier isextracted, STEP 720. A wide bit range specifier can address any of theregisters 570, i.e., the full register file is addressed, as well as allbits in those registers, STEP 725. The corresponding register may be anyregister in the entire register file. The instruction is then computedusing the data from the register with the computation being on arbitraryinput and output register pairings, STEP 730. In other words, the VSXinstructions operate on any of the registers in the register file andare not limited to a particular sub-range of registers. The results ofthe computation are then written back to an appropriate register in theregister file, STEP 735.

If the opcode of the instruction indicates that the instruction is not aVSX instruction, INQUIRY 715, then the decode logic determines if theinstruction opcode identifies the instruction to be a scalarinstruction, e.g., a floating point instruction or the like, INQUIRY 740(FIG. 7B). If the instruction opcode identifies the instruction as ascalar instruction, then a narrow bit range specifier is extracted thatidentifies a subset of registers within the register file, andoptionally, a subset of bits within the registers of the subset ofregisters, STEP 745. A full bit range specifier is generated based onthe instruction type and the narrow bit range specifier, STEP 750. Datais extracted from a subset of registers, e.g., the scalar subset ofregisters, associated with the instruction type specified by the opcodeusing the narrow bit range specifier, STEP 755. The data is provided tothe computation/functional units which compute results based on inputand output registers corresponding to the scalar subset of registers inthe register file, STEP 760. The results of the computation are thenwritten back to an appropriate register in the subset of registers forthis instruction type, e.g., scalar register subset, STEP 765.

If the opcode of the instruction indicates that the instruction is not ascalar instruction, INQUIRY 715, then a narrow bit range specifier isextracted that again identifies a subset of registers in the registerfile and optionally another subset of bits within these registers, STEP770. A full bit range specifier is generated based on the instructiontype, e.g., vector, SIMD, or VMX instruction, and the narrow bit rangespecifier, STEP 775. Data is extracted from a subset of registers, e.g.,the vector subset of registers, associated with the instruction typespecified by the opcode using the full bit range specifier, STEP 780.The data is provided to the computation/functional units which computeresults based on input and output registers corresponding to the vectorsubset of registers in the register file, STEP 785. The results of thecomputation are then written back to an appropriate register in thesubset of registers for this instruction type, e.g., vector registersubset, STEP 790. The operation then terminates.

It can be seen from the above description that one or more illustrativeembodiments provide a register file and decode methodology that permitsa plurality of different types of addressing modes. For example, in afirst addressing mode, a non-contiguous encoding is used to select alloperand registers from a full set of registers in the register filebased on a first instruction type, e.g., VSX instruction type. In asecond addressing mode, a contiguous encoding is used and a first rangeof addressable operand registers of the full set of registers in theregister file is selected based on a second instruction type, e.g., ascalar instruction type. A register address is constructed for each ofthe operands such that all of the operands for the instruction areobtained from the first range of addressable operand registers.

In a third addressing mode, a contiguous encoding is also used and asecond range of addressable operand registers is selected from the fullset of registers in the register file based on a third instruction type,e.g., a vector instruction type. A register address is constructed foreach of the operands such that the operands for the instruction areobtained from the second range of addressable operand registers. Thissecond range of operand registers is, in one example, different from thefirst range of operand registers such that a register within the firstrange is not within the second range of operand registers.

One or more illustrative embodiments improve upon known systems andprocessor register file architectures and instruction decodemethodologies by allowing a single register file to be used inprocessing legacy scalar, legacy vector, and vector-scalar instructions.In this way, legacy scalar and vector instructions may be processed inaddition to vector-scalar instructions with data formats beingcompatible between the various instruction types. Moreover, since asingle register file is being utilized, the overhead associated withswitching between separate register files is avoided. Register sharingin accordance with one or more illustrative embodiments reduces the chiparea of a register file and allows a unified register file to beutilized while maintaining legacy code without building separate legacyregister files. One or more illustrative embodiments allow for datasharing between legacy and new/enhanced instructions, i.e., a legacyinstruction may write one of registers 530 or 550, and a VSX instructioncan combine values from any or all of registers 570.

In a further aspect of the present invention, a capability is providedfor translating between different representations. As an example, when aproducer instruction is of one format and produces a result to beconsumed by a consumer instruction of a different format, a conversiontakes place. In one particular aspect, a compiler executing on aprocessor determines the mismatch and inserts an appropriate conversioninstruction between the producer and consumer instructions, as describedwith reference to FIG. 8. As one example, FIG. 8 depicts on embodimentof the logic to determine that conversion is necessary or desired, andto select and insert a conversion instruction. In one example, it is thecompiler performing this logic. However, in other embodiments, it can beother components or entities of or executing on the processor.

Referring to FIG. 8, initially a dependence is selected between twoinstructions using a data type with multiple representations, STEP 800.That is, two instructions that are dependent on one another (e.g., oneis to use a value or result provided by another) are selected forprocessing. A determination is made as to whether the selectedinstructions (e.g., the producer and consumer instructions) correspondto a same representation, INQUIRY 802. If both instructions have thesame or compatible representation, then a further determination is madeas to whether there are more dependencies to process, INQUIRY 804. Ifso, processing continues with STEP 800.

Returning to INQUIRY 802, if the producer and consumer instructions donot correspond to the same or a compatible representation, then aconversion instruction is inserted between the two instructions in theinstruction stream, STEP 806. The conversion instruction is used toconvert the data of one of the instructions (e.g., the producerinstruction) to a format compatible with the other instruction (e.g.,the consumer instruction). In one example, the data to be converted isin one register of the multi-addressable register file (identified inthe conversion instruction) and the converted data is placed in anotherregister (or the same register) of the multi-addressable register file(also indicated in the conversion instruction). The instruction to usethe data obtains the converted data from that register. In one example,the compiler determines the registers to be used by the conversioninstruction based on the producer and consumer instructions. Theproducer instruction indicates the register that has the data to betranslated or converted, and the consumer instruction provides anindication of the register it will use to retrieve the data. Processingcontinues with INQUIRY 804.

In one embodiment, the conversion instruction that is inserted dependson one or more criteria, as described in further detail with referenceto FIGS. 9 and 10. FIG. 9 relates to vector to scalar conversion, andFIG. 10 relates to scalar to vector conversion. One of these techniquesis selected depending on the type of conversion (e.g., vector-scalar orscalar-vector). This logic, including the logic of FIGS. 9 and 10, areperformed by the compiler, in one example.

Referring initially to FIG. 9, a determination is made as to whether theformat conversion desired is to convert a single-precision vectorelement to a single-precision scalar, INQUIRY 900. If the desired formatconversion is a simple copy in which the conversion is from a singleprecision vector element to single-precision scalar, then a convertinstruction, referred to herein as XSCVSPDPN, is used, STEP 902. Thisinstruction converts a single precision vector element (32-bitfloating-point register format) to single precision scalar (64-bitfloating-point register format). This conversion is only considered aphysical format change and not a logical change, and therefore, noexceptions are detected or signaled, and signaling Not-a-Number (SNaN)inputs are preserved as SNaNs in the result returned. That is, theconversion is performed transparent to any entity or component outsidethe compiler. Since no exception is raised (i.e., detected and/orsignaled), the conversion is said to be performed independent of anexception (i.e., absent or without an exception).

Returning to INQUIRY 900, however, if the desired format conversion isnot to convert a single precision vector element to a single precisionscalar element, then a different instruction, referred to herein as anXSCVSPDP instruction, is used in this embodiment, STEP 904. Thisinstruction converts a single-precision vector element (32-bitfloating-point register format) to a double-precision scalar (64-bitfloating-point register format). This is considered a true logical and aphysical format change, and therefore, an invalid operation exception isdetected and signaled as a Signaling NAN (Not-a-Number). SNaN values areconverted to QNaNs (quiet NaN) in the result returned.

Referring to FIG. 10, in a further embodiment, a decision is made as towhether the format conversion that is desired is to convert asingle-precision scalar datum to a single-precision vector element,INQUIRY 1000. If the desired conversion is a simple copy and asingle-precision scalar is to be converted to a single-precision vectorelement, then a further determination is made as to whether a vector ofcopies of the value is to be created, INQUIRY 1002. If a vector ofcopies of the value is not to be created, then an instruction referredto herein as XSCVDPSPN is used, which converts a single-prevision scalar(64-bit floating-point register format) to a single-precision vectorelement (32-bit floating-point register format), STEP 1004. This is onlyconsidered a physical format change and not a logical change, andtherefore, no exceptions are detected or signaled and SNaN values arepreserved as SNaNs in the result returned. Again, the conversion istransparent and performed independent of exceptions. Returning toINQUIRY 1002, however, if a vector of copies of the value is to becreated, INQUIRY 1002, then an instruction referred to herein asXSCVSSPVSPSPLT is used, STEP 1006. This converts a single precisionscalar (64-bit floating-point register format) to a single-precisionvector element (32-bit floating-point register format), and replicatesto all four vector elements. Again, this is only considered a physicalformat change, no exceptions are detected or signaled, and SNaN inputsare preserved as SNaNs in the result returned.

Returning to INQUIRY 1000, if the format conversion desired is not aconversion of a single-precision scalar to a single-precision vectorelement, then an instruction referred to herein as XSCVDPSP is used,STEP 1008. This instruction converts a double-precision scalar (64-bitfloating-point register format) to a single-precision vector element(32-bit floating-point register format). In this case, the conversion isconsidered a true logical as well as physical format change, andtherefore, an invalid operation exception is detected and signaled as aSignaling Not-a-Number operand. SNaN values are converted to QNaNs inthe result returned.

Described above are a number of conversion instructions that may be usedin one or more embodiments. Further details regarding these instructionsare described below, as well as in “RFC02242.r3: BFP/VSX MiscellaneousOperations”, which is included as part of this description.

Initially, further details are provided regarding the XSCVSPDPNinstruction. In one example, this instruction includes two fieldsidentifying an opcode (e.g., one field having a primary opcode which iscombined (e.g., concatenated) with an extended opcode of another field)to identify the instruction; a first field (e.g., T field) and a firstbit (e.g., TX field; concatenated) designating a first register; and asecond field (e.g., B field) and a second bit (e.g., BX field;concatenated) designating a second register. Sample pseudo-code is asfollows:

reset_xflags( ) src ← VSR[32×BX+B].word[0] result ←ConvertSPtoDP_NS(src) VSR[32×TX+T].dword[0] ← resultVSR[32×TX+T].dword[1] ← 0xUUUU_UUUU_UUUU_UUUU

Let XT be the value TX concatenated with T.

Let XB be the value BX concatenated with B.

Let src be the single-precision floating-point value in word element 0of VSR[XB].

src is placed into doubleword element 0 of VSR[XT] in double-precisionformat. The encoding of SNaN values are preserved (i.e., not convertedto a QNaN).

The contents of doubleword element 1 of VSR[XT] are undefined.

Special Registers Altered

-   -   None

VSR Data Layout for XSCVSPDPN

Further, code snippet examples for converting a 32-bit single-precisionvector element to 64-bit single-precision scalar are provided below:

C source void compute1( ) {   float sa, sb, sx;   vector float vx, vy,vz;    :   vz = vec_mergeh(vx,vy); // will not set VXSNAN exception   sa= vz[1]; // vector-to-scalar simple copy, do not   set VXSNAN exception  sb = vz[3]; // vector-to-scalar simple copy, do not   set VXSNANexception   sx = compute2(sa,sb); } float compute2(float sa, float sb) {  return sa + sb; // where VXSNAN should be detected } Equivalentassembler compute1:    :     :   lxvx vx,addr_vx   lxvx vx,addr_vy    :    :   vmrghwvz,vx,vy   vsldoi vtmp1,vz,vz,4 ; extract SP vectorelement 1 of vz   xscvspdpn sa,vtmp1 ; convert SP vector 32-bit formatto  scalar 64-bit format, do not set  VXSAN, simple copy   vsldoivtmp2,vx,vx,12 ; extract vector element 3 of vz   xscvspdpn sa,vtmp2 ;convert SP vector 32-bit format to  scalar 64-bit format, do not set VXSNAN, simple copy   bcl compute2    :  : compute2:    :  :   xsaddspsx,sa,sb # VXSNAN should be detected here    :   blr

Further, details regarding the XSCVSPDP instruction are described below.In one example, this instruction includes two fields identifying anopcode (e.g., one field having a primary opcode which is combined (e.g.,concatenated) with an extended opcode of another field) to identify theinstruction; a first field and a first bit (e.g., concatenated)designating a first register; and a second field and a second bit (e.g.,concatenated) designating a second register. Sample pseudo-code is asfollows:

reset_xflags( ) src ← VSR[32×BX+B].word[0] result ←ConvertVectorSPtoScalarSP(src) if(vxsnan_flag) then SetFX(VXSNAN)vex_flag ← VE & vxsnan_flag FR ← 0b0 FI ← 0b0 if( ~vex_flag ) then do  VSR[32×TX+T].dword[0] ← result   VSR[32×TX+T].dword[1] ←0xUUUU_UUUU_UUUU_UUUU   FPRF ← ClassDP(result) end

Let XT be the value TX concatenated with T.

Let XB be the value BX concatenated with B.

Let src be the single-precision floating-point value in word element 0of VSR[XB].

If src is a SNaN, the result is src, converted to a QNaN (i.e., bit 9 ofsrc set to 1). VXSNAN is set to 1.

Otherwise, the result is src.

The result is placed into doubleword element 0 of VSR[XT] indouble-precision format.

The contents of doubleword element 1 of VSR[XT] are undefined.

FPRF is set to the class and sign of the result. FR is set to 0. FI isset to 0.

If a trap-enabled invalid operation exception occurs, VSR[XT] is notmodified, FPRF is not modified, FR is set to 0, and FI is set to 0.

Special Registers Altered

FPRF FR←0b0 FI←0b0 FX VXSNAN

VSR Data Layout for XSCVSPDP

Yet further, details regarding the XSCVDPSPN instruction are describedbelow. In one example, this instruction includes two fields identifyingan opcode (e.g., one field having a primary opcode which is combined(e.g., concatenated) with an extended opcode of another field) toidentify the instruction; a first field and a first bit (e.g.,concatenated) designating a first register; and a second field and asecond bit (e.g., concatenated) designating a second register. Samplepseudo-code is as follows:

reset_xflags( ) src ← VSR[32×BX+B].dword[0] result ←ConvertDPtoSP_NS(src) VSR[32×TX+T].word[0] ← result VSR[32×TX+T].word[1]← 0xUUUU_UUUU VSR[32×TX+T].word[2] ← 0xUUUU_UUUU VSR[32×TX+T].word[3] ←0XUUUU_UUUU

Let XT be the value TX concatenated with T.

Let XB be the value BX concatenated with B.

Let src be the single-precision floating-point value in doublewordelement 0 of VSR[XB] represented in double-precision format.

src is placed into word element 0 of VSR[XT] in single precision format.The encoding of SNaN values are preserved (i.e., not converted to aQNaN).

The contents of word elements 1, 2, and 3 of VSR[XT] are undefined.

Special Registers Altered

None

VSR Data Layout for xscvdpspn

Further, details regarding the XSCVSSPVSPSPLT instruction are describedbelow. In one example, this instruction includes two fields identifyingan opcode (e.g., one field having a primary opcode which is combined(e.g., concatenated) with an extended opcode of another field) toidentify the instruction; a first field (e.g., T. field) and a first bit(e.g., TX bit; concatenated) designating a first register; and a secondfield (e.g., B field) and a second bit (e.g., BX bit; concatenated)designating a second register. Sample pseudo-code is as follows:

reset_xflags( ) src ← VSR[32×BX+B].dword[0] result ←ConvertDPtoSP_NS(src) do i = 0 to 3   VSR[32×TX+T].word[i] ← result end

Let XT be the value TX concatenated with T.

Let XB be the value BX concatenated with B.

Let SRC be the single-precision floating-point value in doublewordelement 0 of VSR[XB] represented in double-precision format. Theencoding of SNaN values are preserved (i.e., not converted to a QNaN).

src is placed into each word element of VSR[XT] in single-revisionformat.

Special Registers Altered

-   -   None

VSR Data Layout for xscvsspvspsplt

Additionally, code snippet examples for converting a 64-bitsingle-precision scalar to a 32-bit single-precision vector element withreplication (splat) are described below:

C Source void compute( ) {    :   float sa;   vector float vx;    :   vx= vec_splatw(sa,0);    // create vector of 4 copies of SA } Equivalentassembler compute:    :   lxsspx sa,addr_sa   xscvdpspn sa,sa   vspltwvx,sa,0    :   blr

Further, details regarding XSCVDPSP are provided below. In one example,this instruction includes two fields identifying an opcode (e.g., onefield having a primary opcode which is combined (e.g., concatenated)with an extended opcode of another field to identify the instruction; afirst field (e.g., T field) and a first bit (e.g., TX bit; concatenated)designating a first register; and a second field (e.g., B field) and asecond bit (e.g., BX bit; concatenated) designating a second register.Sample pseudo-code is as follows:

reset_xflags( ) src ← VSR[32×BX+B].dword[0] result ← ConvertDPtoSP(src)if(vxsnan_flag) then SetFX(VXSNAN) if(xx_flag) then SetFX(XX)if(ox_flag) then SetFX(OX) if(ux_flag) then SetFX(UX) vex_flag ← VE &vxsnan_flag if( ~vex_flag ) then do   VSR[32×TX+T].word[0] ← result  VSR[32×TX+T].word[1] ← 0xUUUU_UUUU   VSR[32×TX+T].word[2] ←0xUUUU_UUUU   VSR[32×TX+T].word[3] ← 0xUUUU_UUUU   FPRF ←ClassSP(result)   FR ← inc_flag   FI ← xx_flag end else do   FR ← 0b0  FI ← 0b0 end

Let XT be the value TX concatenated with T.

Let XB be the value BX concatenated with B.

Let src be the double-precision floating-point value in doublewordelement 0 of VSR[XB].

If src is a SNaN, the result is src converted to a QNaN (i.e., bit 12 ofsrc is set to 1). VXSNAN is set to 1.

Otherwise, if src is a QNaN, an Infinity, or a Zero, the result is src.

Otherwise, the result is src rounded to single-precision using therounding mode specified by RN.

The result is placed into word element 0 of VSR[XT] in single-precisionformat.

The contents of word elements 1, 2, and 3 of VSR[XT] are undefined.

FPRF is set to the class and sign of the result. FR is set to indicateif the result was incremented when rounded. FI is set to indicate theresult is inexact.

If a trap-enabled Invalid Operation exception occurs, VSR[XT] and FPRFare not modified, and FR and FI are set to 0.

Special Registers Altered

FPRF FR FI FX OX UX XX VXSNAN

VSR Data Layout for xscvdpsp

Described in detail herein is an extended VSX facility with support forinstructions computing on scalar single precision numbers using a 64-bitrepresentation and instructions computing on vector single precisionnumbers using a 32-bit representation. There is further provided acapability to translate from a first to a second representation. In afirst embodiment, explicit conversion from 64 to 32-bit and 32-bit to 64bit operations are used. In a second embodiment, instructions are usedto convert between single precision representations by using doubleprecision/single precision conversions to convert between 32 bit and 64bit representations of single precision numbers, in which the 64-bitrepresentation of a single precision number is of a similar form as thedouble precision operation. In a further embodiment, the conversionoperation also provides a splat function, in which a 32-bit singleprecision value is replicated to a plurality of element positions. Inone embodiment, the conversion operation also provides a selectionfunction in which a 32-bit single precision value is selected from aplurality of element positions by means of a position indicator.

In accordance with one or more aspects, multiple architectedrepresentations are used. A capability is provided to include andidentify 64-bit single precision numbers in a first mode of operation;and 32-bit single precision numbers in a second mode of operation. Acapability is provided to identify a first and second operation based onthe type of operation needed to compatibly interoperate with the firstand second legacy encoding representing first and second encodings. Atechnique to translate between the first and second representation isprovided.

By converting between one representation and another, executioncomplexity may be reduced by eliminating the need to perform checking ofboundary conditions. Further, by inserting a conversion instruction toconvert one data representation to another, the number of instructionsto be encoded, the decode logic and implementation costs are reduced.

In accordance with one or more aspects, the mixing of 32-bit singleprecision representation used for vector computing and 64-bitrepresentation of single precision floating point using scalar computingis enabled. New single precision-to-single precision format conversioninstructions are provided to convert from one 64-bit format to another32-bit format or vice-versa. Also, a conversion instruction converting a64-bit single precision to a 32-bit single precision and replicate isprovided in which the same value is replicated in the register fourtimes, which is a common operation for a vector-scalar computation.Conversion is performed without regard to signaling characteristics,because a conversion of this type is not a computation instruction.

Additionally, a compiler technique is provided to facilitate computationusing two different floating point representations for the same 32-bitsingle precision floating point data type. The compiler is extended torecognize that when data is used it may be either in one or anotherrepresentation and a check is to be performed to ensure that the dataused is in the appropriate format used by an instruction. This isaccomplished by associating each instruction with a data type, and thedata type of the instruction generating a result is to be the same asthe data type of the instruction using the result. If that is not thecase, a conversion is inserted. The format conversions are performeddirectly from register-to-register without setting an exception.

In one aspect, floating point registers are used that can contain twodifferent representations of each floating point number. Instructionsspecify which type of floating point number is to be used for operandsof the instruction and obtain/store the operand from a selected one ofthe representations if present. Also, a compiler knows of the floatingpoint registers and inserts conversion instructions as needed when thefloating point register contains the wrong representation.

In one particular example, an instruction is provided that converts froma first architected format (e.g., the SP64 64-bit wide single precisionbinary floating point format in accordance with the definition of thePower ISA) in a register of a register class (which can be amulti-addressable register file) to a second architected format (e.g.,the SP32 32-bit wide single precision binary floating point format inaccordance with the IEEE 754 memory format definition and a similarPower ISA definition) for a register file format.

The SP64 to SP32 conversion is used, for instance, to accommodate themaintenance of different internal formats by the compiler in accordancewith the architecture definition where each number has, e.g., an exactcorrespondence (the SP64 to SP32 format conversion). This is differentfrom a DP (Double Precision) to SP conversion, which is a user-definedoperation.

For example, the DP to SP conversion needs to map DP numbers to SPnumbers, even for DP numbers that have no representation in the SPformat. It may do this by performing rounding of excess mantissa bits(in accordance with one of many possible rounding modes, such astruncate, round to 0, round to −infinity, round to +infinity, round awayfrom zero, round to even, round to odd, and many more), flush to zero ofsmall numbers that are representable in DP but not in SP, and saturatinglarge numbers that are representable in DP but not in SP to +infinity or−infinity. In comparison, the SP64 to SP32 convert operates, in oneexample, exclusively on SP numbers, so in at least one embodiment, theoperation of SP64 to SP32 convert is undefined when an input is not inrepresentable IEEE SP floating point range. Compliant hardware may dowhatever it chooses, in accordance with an aspect of this embodiment; itmay choose to treat an out of range (illegal) SP64 bit input as if itwere a DP number, and round it; it may choose to raise a specificationinterrupt for out of range numbers; it may choose to generate a randomresult; or it may not generate a result at all.

As another example, a DP to SP conversion is a user-specifiedinstruction for a data type conversion, and in accordance with thedefinition of this user-specified instruction, an SNaN (i.e., aSignaling NaN, where NaN is Not-a-Number indication in accordance withthe IEEE standard) should raise an exception. Also, in one embodiment,this user-specified instruction may be defined to set exceptions onarithmetic conditions during number conversion (e.g., underflow oroverflow). In comparison, the SP64 to SP32 is a format conversioncorresponding to internal operation of a compiler exploiting thehardware. In one example, each valid data point in the SP64 bit formatcorresponds to exactly one data point in the SP32 format. When any suchdata point is provided as an input (and specifically including SNaNs),the data points are mapped from the one format representation to thesecond representation, and not raising an interrupt.

In one embodiment, a legal single precision number is directly convertedfrom a first architected register format to a second register format,wherein the instruction is completed and the converted result is writtento a target register for IEEE single precision floating point Number orNot-a-Number inputs. In one example, a signaling NaN is preserved in thetarget register as a signaling NaN.

As will be appreciated by one skilled in the art, one or more aspects ofthe present invention may be embodied as a system, method or computerprogram product. Accordingly, one or more aspects of the presentinvention may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system”. Furthermore, one or more aspects of the presentinvention may take the form of a computer program product embodied inone or more computer readable medium(s) having computer readable programcode embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readablestorage medium. A computer readable storage medium may be, for example,but not limited to, an electronic, magnetic, optical, electromagnetic,infrared or semiconductor system, apparatus, or device, or any suitablecombination of the foregoing. More specific examples (a non-exhaustivelist) of the computer readable storage medium include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing. In the context of this document,a computer readable storage medium may be any tangible medium that cancontain or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

Referring now to FIG. 11, in one example, a computer program product1100 includes, for instance, one or more non-transitory computerreadable storage media 1102 to store computer readable program codemeans or logic 1104 thereon to provide and facilitate one or moreaspects of the present invention.

Program code embodied on a computer readable medium may be transmittedusing an appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for one or moreaspects of the present invention may be written in any combination ofone or more programming languages, including an object orientedprogramming language, such as Java, Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language, assembler or similar programming languages. Theprogram code may execute entirely on the user's computer, partly on theuser's computer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

One or more aspects of the present invention are described herein withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of one or more aspects of the present invention. In thisregard, each block in the flowchart or block diagrams may represent amodule, segment, or portion of code, which comprises one or moreexecutable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

In addition to the above, one or more aspects of the present inventionmay be provided, offered, deployed, managed, serviced, etc. by a serviceprovider who offers management of customer environments. For instance,the service provider can create, maintain, support, etc. computer codeand/or a computer infrastructure that performs one or more aspects ofthe present invention for one or more customers. In return, the serviceprovider may receive payment from the customer under a subscriptionand/or fee agreement, as examples. Additionally or alternatively, theservice provider may receive payment from the sale of advertisingcontent to one or more third parties.

In one aspect of the present invention, an application may be deployedfor performing one or more aspects of the present invention. As oneexample, the deploying of an application comprises providing computerinfrastructure operable to perform one or more aspects of the presentinvention.

As a further aspect of the present invention, a computing infrastructuremay be deployed comprising integrating computer readable code into acomputing system, in which the code in combination with the computingsystem is capable of performing one or more aspects of the presentinvention.

As yet a further aspect of the present invention, a process forintegrating computing infrastructure comprising integrating computerreadable code into a computer system may be provided. The computersystem comprises a computer readable medium, in which the computermedium comprises one or more aspects of the present invention. The codein combination with the computer system is capable of performing one ormore aspects of the present invention.

Although various embodiments are described above, these are onlyexamples. For example, computing environments of other architectures canincorporate and use one or more aspects of the present invention.Further, one or more aspects of the present invention apply to anyformat with multiple representations. As one specific example, one ormore aspects can apply to a definition of quad-precision (128-bit)floating-point extension supporting both 64-bit double-precision formatand a 128-bit double precision format. One or more aspects may apply toconsolidating multiple extensions that support different formatdefinitions for a data type. Further, other instructions may be usedwithout departing from a spirit of the present invention.

Further, other types of computing environments can benefit from one ormore aspects of the present invention. As an example, an environment mayinclude an emulator (e.g., software or other emulation mechanisms), inwhich a particular architecture (including, for instance, instructionexecution, architected functions, such as address translation, andarchitected registers) or a subset thereof is emulated (e.g., on anative computer system having a processor and memory). In such anenvironment, one or more emulation functions of the emulator canimplement one or more aspects of the present invention, even though acomputer executing the emulator may have a different architecture thanthe capabilities being emulated. As one example, in emulation mode, thespecific instruction or operation being emulated is decoded, and anappropriate emulation function is built to implement the individualinstruction or operation.

In an emulation environment, a host computer includes, for instance, amemory to store instructions and data; an instruction fetch unit tofetch instructions from memory and to optionally, provide localbuffering for the fetched instruction; an instruction decode unit toreceive the fetched instructions and to determine the type ofinstructions that have been fetched; and an instruction execution unitto execute the instructions. Execution may include loading data into aregister from memory; storing data back to memory from a register; orperforming some type of arithmetic or logical operation, as determinedby the decode unit. In one example, each unit is implemented insoftware. For instance, the operations being performed by the units areimplemented as one or more subroutines within emulator software.

As a further example, a data processing system suitable for storingand/or executing program code is usable that includes at least oneprocessor coupled directly or indirectly to memory elements through asystem bus. The memory elements include, for instance, local memoryemployed during actual execution of the program code, bulk storage, andcache memory which provide temporary storage of at least some programcode in order to reduce the number of times code must be retrieved frombulk storage during execution.

Input/Output or I/O devices (including, but not limited to, keyboards,displays, pointing devices, DASD, tape, CDs, DVDs, thumb drives andother memory media, etc.) can be coupled to the system either directlyor through intervening I/O controllers. Network adapters may also becoupled to the system to enable the data processing system to becomecoupled to other data processing systems or remote printers or storagedevices through intervening private or public networks. Modems, cablemodems, and Ethernet cards are just a few of the available types ofnetwork adapters.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising”, when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below, if any, areintended to include any structure, material, or act for performing thefunction in combination with other claimed elements as specificallyclaimed. The description of the present invention has been presented forpurposes of illustration and description, but is not intended to beexhaustive or limited to the invention in the form disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the invention.The embodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiment with various modifications as are suited to theparticular use contemplated.

1. A computer program product for executing a machine instruction, saidcomputer program product comprising: a computer readable storage mediumreadable by a processing circuit and storing instructions for executionby the processing circuit for performing a method comprising: obtaining,by a processor, a machine instruction for execution, the machineinstruction being defined for computer execution according to a computerarchitecture, the machine instruction comprising: at least one opcodefield identifying a convert instruction; at least one field used tospecify a first register; and at least one other field used to specify asecond register; executing, by the processor, the machine instruction,the executing comprising: obtaining from the first register a singleprecision binary floating point datum in a first representation in afirst format; converting the single precision binary floating pointdatum of the first representation in the first format to a convertedsingle precision binary floating point datum of a second representationin a second format; and placing the converted single precision binaryfloating point datum in the second register.
 2. The computer programproduct of claim 1, wherein the method further comprises: determiningthat the single precision binary floating point datum of the firstrepresentation in the first format is to be converted to a singleprecision binary floating point datum of the second representation inthe second format; and obtaining the convert instruction, based on thedetermining.
 3. The computer program product of claim 1, wherein thedetermining is performed by a compiler executing on the processor or onanother processor.
 4. The computer program product of claim 1, whereinat least one of the first register and the second register is a registerof a multi-addressable register file.
 5. The computer program product ofclaim 4, wherein the multi-addressable register file comprises aplurality of registers, and wherein a first subrange of registers of theplurality of registers is defined for data of one format, a secondsubrange of registers of the plurality of registers is defined for dataof another format, and the plurality of registers is defined for data ofat least one additional format.
 6. The computer program product of claim5, wherein each of the plurality of registers is defined to include 64bscalar single precision floating point data and 32b vector singleprecision floating point data.
 7. The computer program product of claim1, wherein the machine instruction is inserted between a firstinstruction and a second instruction, the second instruction having adependence on the first instruction, and the first instruction toproduce data having a different format than a format used by the secondinstruction.
 8. The computer program product of claim 7, wherein thefirst register includes a datum of the first instruction to beconverted.
 9. The computer program product of claim 1, wherein the firstrepresentation comprises a vector representation and the first formatcomprises 32 bit and the second representation comprises a scalarrepresentation and the second format comprises 64 bit or the firstrepresentation comprises a scalar representation and the first formatcomprises 64 bit and the second representation comprises a vectorrepresentation and the second format comprises 32 bit.
 10. The computerprogram product of claim 1, wherein the convert instruction includes areplication function.
 11. The computer program product of claim 1,wherein the converted single precision binary floating point datumcomprises a signaling Not-a-Number (NaN), and wherein the signaling NaNis preserved as a signaling NaN in the second register.
 12. A computersystem for executing a machine instruction, said computer systemcomprising: a memory; and a processor in communications with the memory,wherein the computer system is configured to perform a method, saidmethod comprising: obtaining, by a processor, a machine instruction forexecution, the machine instruction being defined for computer executionaccording to a computer architecture, the machine instructioncomprising: at least one opcode field identifying a convert instruction;at least one field used to specify a first register; and at least oneother field used to specify a second register; executing, by theprocessor, the machine instruction, the executing comprising: obtainingfrom the first register a single precision binary floating point datumin a first representation in a first format; converting the singleprecision binary floating point datum of the first representation in thefirst format to a converted single precision binary floating point datumof a second representation in a second format; and placing the convertedsingle precision binary floating point datum in the second register. 13.The computer system of claim 12, wherein the method further comprises:determining that the single precision binary floating point datum of thefirst representation in the first format is to be converted to a singleprecision binary floating point datum of the second representation inthe second format; and obtaining the convert instruction, based on thedetermining.
 14. The computer system of claim 12, wherein at least oneof the first register and the second register is a register of amulti-addressable register file, and wherein the multi-addressableregister file comprises a plurality of registers, and wherein a firstsubrange of registers of the plurality of registers is defined for dataof one format, a second subrange of registers of the plurality ofregisters is defined for data of another format, and the plurality ofregisters is defined for data of at least one additional format.
 15. Thecomputer system of claim 14, wherein each of the plurality of registersis defined to include 64b scalar single precision floating point dataand 32b vector single precision floating point data.
 16. The computersystem of claim 12, wherein the machine instruction is inserted betweena first instruction and a second instruction, the second instructionhaving a dependence on the first instruction, and the first instructionto produce data having a different format than a format used by thesecond instruction.
 17. The computer system of claim 12, wherein thefirst representation comprises a vector representation and the firstformat comprises 32 bit and the second representation comprises a scalarrepresentation and the second format comprises 64 bit or the firstrepresentation comprises a scalar representation and the first formatcomprises 64 bit and the second representation comprises a vectorrepresentation and the second format comprises 32 bit. 18-20. (canceled)21. A computer program product, in a data processing system, forprocessing an instruction, said computer program product comprising: acomputer readable storage medium readable by a processing circuit andstoring instructions for execution by the processing circuit forperforming a method comprising: determining an instruction type for areceived instruction; accessing a multi-addressable register file basedon the instruction type; and processing the instruction using at leastone function unit of the data processing system based on results ofaccessing the multi-addressable register file, wherein themulti-addressable register file comprises a first subset of registersassociated with first instructions of a first instruction type and asecond subset of registers associated with second instructions of asecond instruction type, and wherein third instructions of a thirdinstruction type and fourth instructions of a fourth instruction typeaccess registers in an entire set of registers of the multi-addressableregister file including registers in the first subset of registers andregisters in the second subset of registers, wherein the firstinstruction type is a scalar instruction type, the second instructiontype is a floating point instruction type, the third instruction type isa 64-bit single precision floating point instruction type and the fourthinstruction type is a 32-bit vector single precision floating pointinstruction type.